package com.htgd.gardenexpo.task;

import com.htgd.gardenexpo.entity.GeConCompetitionSports;
import com.htgd.gardenexpo.service.GeConCompetitionSportsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 智慧运动定时任务
 */
@Component
@Slf4j
public class SportTask {

    @Autowired
    private GeConCompetitionSportsService geConCompetitionSportsService;

    @Scheduled(cron = "0 0 1 * * ?")
    void competitionSportPrize(){
        log.info("赛事运动奖项定时任务");

        //获取结束的赛事
//        List<GeConCompetitionSports>  endList = geConCompetitionSportsService.getEndList();
    }

    @Scheduled(cron = "0 0 1 * * ?")
    void leisureSportPrize(){
         log.info("休闲运动奖项定时任务");
     }


}
